
void Timer_init(void)
{


}
//---------Subroutine definition---------
//Function called from TIMER1 ISR. Just increments the count by
//  one each time it enters this function. Exit from the program
//  after certain count value is reached.
void TimerEventHandler(void)
{
	//Process timer event here
	cnt++;  
  
	//Exit from the program when certain count is reached
	if (cnt > TIMER_CNT)
	{   
		TIMER_pause(hTimer1);
		TIMER_close(hTimer1);
		printf("\nTEST PASSED\n");
		exit(0);
	}
	printf("\n Count : %3d ",cnt);
}

//ISR to service TIMERINT1. 
//  vecs_timer1.asm must be modified to include c_int14 entry.
interrupt void c_int14(void)    
{
	TimerEventHandler();
	return;
}